package com.lfy.kcat.workflow.config;

import com.lfy.kcat.workflow.ai.OllamaModerationService;
import com.lfy.kcat.workflow.biz.CamundaJavaDelegateHandler;
import com.lfy.kcat.workflow.feign.ContentServiceFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.camunda.bpm.engine.TaskService;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.camunda.bpm.engine.task.Task;
import org.dromara.common.core.dto.DramaAuthCompleteDTO;
import org.dromara.common.core.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
 * @author leifengyang
 * @version 1.0
 * @date 2025/9/6 16:27
 * @description:
 */
@Slf4j
@Configuration
public class CamundaServiceConfig {

    @Autowired
    CamundaJavaDelegateHandler camundaJavaDelegateHandler;


    @Bean("ragDataHandler")
    public JavaDelegate ragDataHandler() {
        return execution -> camundaJavaDelegateHandler.ragDataHandler(execution);
    }

    @Bean("tecentVodTranslator")
    public JavaDelegate tecentVodTranslator(){
        return execution -> camundaJavaDelegateHandler.tecentVodTranslator(execution);
    }

    @Bean("updateDramaAuthStatus")
    public JavaDelegate updateDramaAuthStatus(){
        return execution -> camundaJavaDelegateHandler.updateDramaAuthStatus(execution);
    }


    /**
     * AI审核代理
     * @return
     */
    @Bean("aiCheck")
    public JavaDelegate aiCheck() {
        return execution -> camundaJavaDelegateHandler.aiCheck(execution);
    }



    @Bean("audiService")
    public JavaDelegate audiService() {

        return (execution) -> camundaJavaDelegateHandler.audiService(execution);
    }

}
